package com.multithreading.Thread_004;

/**
 * @author zx
 * @version 1.0
 * @package_name: com.multithreading.Thread_004
 * @date 2024/5/13 18:00
 */
public class ThreadDemo {
    public static void main(String[] args) {

        // 创建线程
//        MyThread myThread001 = new MyThread("飞机");
//        MyThread myThread002 = new MyThread("坦克");
//
//        // 启动线程
//        myThread001.start();
//        myThread002.start();

        // 获取当前线程
        Thread currentThread = Thread.currentThread();
        String format = String.format("当前线程：%s", currentThread.getName());
        System.out.println(format);

    }
}
